<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        [v-cloak] {
            display: none;
        }
        /* 属性选择器，让所有含有v-cloak指令的标签隐藏 */
    </style>
</head>

<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h1 v-cloak>{{msg}}</h1>
        <h1 v-html="msg"></h1>

        <ul>
            <li v-for="i in 10">{{i}}</li>
        </ul>
        <!-- 循环出10个li 从1开始 -->

        <!-- <ul>
            <li v-for="item in arr">{{item.name}}</li>
        </ul> -->

        <h2 v-show="flag">{{msg1}}</h2>
        <h2 v-if="flag">{{msg1}}</h2>
        <h4 v-else>雨什么时候停</h4>
    </div>
    <script src="vue-2.4.0.js"></script>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                flag: false,
                msg1: "郑州一直下雨",
                msg: "hello world",
                arr: [{
                    name: "钢铁侠",
                }, {
                    name: "黑寡妇",
                }, {
                    name: "鹰眼",
                }, {
                    name: "绿巨人",
                }, {
                    name: "美国对长",
                }, {
                    name: "猪猪侠",
                }, {
                    name: "黑豹",
                }, ],
            },
            methods: {},
        });
    </script>
</body>

</html>